package com.snail.readyvr.rest;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

/**
 * Created by MRKING on 2016/11/4.
 */

public class RequestInterceptor implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {
        Request original = chain.request();
        Request request = original.newBuilder()
                .header("Accept-version", RestApiUtils.EPG_VERSION)
                .method(original.method(), original.body())
                .build();
        return chain.proceed(request);
    }
}
